now handle arbitrary buffer sizes.
authorJonathan Blandford <jrb@redhat.com>
Wed, 3 Nov 1999 21:52:16 +0000 (21:52 +0000)
committerJonathan Blandford <jrb@src.gnome.org>
Wed, 3 Nov 1999 21:52:16 +0000 (21:52 +0000)
1999-11-03  Jonathan Blandford  <jrb@redhat.com>

* src/io-gif.c (image_load_increment): now handle arbitrary buffer
sizes.

gdk-pixbuf/ChangeLog
gdk-pixbuf/io-gif.c

index b7bab67af364e07d4a3275150601191a16bd45a4..3be684716de2ac40320f2fa91a30e067e9502628 100644 (file)
@@ -1,3 +1,8 @@
+1999-11-03  Jonathan Blandford  <jrb@redhat.com>
+
+       * src/io-gif.c (image_load_increment): now handle arbitrary buffer
+       sizes.
+
 1999-11-03  Federico Mena Quintero  <federico@redhat.com>
 
        * src/gnome-canvas-pixbuf.c (gnome_canvas_pixbuf_init):
index bd13889d8a6b4ff6928c9e22676cc065793fc64b..8b278d8e590ef564345c7bdf759901de78471325 100644 (file)
@@ -184,7 +184,7 @@ ReadOK (GifContext *context, guchar *buffer, size_t len)
 #endif
                if ((context->size - context->ptr) >= len) {
                        count += len;
-                       memcpy (buffer, context->buf + context->ptr, len);
+                       memmove (buffer, context->buf + context->ptr, len);
                        context->ptr += len;
                        context->amount_needed = 0;
 #ifdef IO_GIFDEBUG
@@ -1030,7 +1030,7 @@ image_load_increment (gpointer data, guchar *buf, guint size)
                } else {
                        /* copy the left overs to the begining of the buffer */
                        /* and realloc the memory */
-                       memcpy (context->buf, context->buf, context->size - context->ptr);
+                       memmove (context->buf, context->buf + context->ptr, context->size - context->ptr);
                        context->buf = g_realloc (context->buf, context->amount_needed + (context->size - context->ptr));
                }
                context->size = context->size - context->ptr;